import React from "react";
import useAuth from "../hooks/useAuth";
/** 允许的路由 */ import { Fragment as _Fragment } from "react/jsx-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
function PermissionWrapper(param) {
    var children = param.children, _param_fallback = param.fallback, fallback = _param_fallback === void 0 ? null : _param_fallback;
    var allow = useAuth();
    return allow ? /*#__PURE__*/ _jsx(_Fragment, {
        children: children
    }) : /*#__PURE__*/ _jsx(_Fragment, {
        children: fallback
    });
}
export default PermissionWrapper;

 //# sourceMappingURL=permission.js.map